package com.adobe.serialization.json
{

	public class JSONToken
	{

		private var _type:int;
		private var _value:Object;

		/**
		 * Creates a new JSONToken with a specific token type and value.
		 *
		 * @param type The JSONTokenType of the token
		 * @param value The value of the token
		 */
		public function JSONToken(type:int=-1 /* JSONTokenType.UNKNOWN */, value:Object=null)
		{
			_type=type;
			_value=value;
		}
		/**
		 * Returns the type of the token.
		 *
		 * @see com.adobe.serialization.json.JSONTokenType
		 */
		public function get type():int
		{
			return _type;
		}
		/**
		 * Sets the type of the token.
		 *
		 * @see com.adobe.serialization.json.JSONTokenType
		 */
		public function set type(value:int):void
		{
			_type=value;
		}
		/**
		 * Gets the value of the token
		 *
		 * @see com.adobe.serialization.json.JSONTokenType
		 */
		public function get value():Object
		{
			return _value;
		}

		/**
		 * Sets the value of the token
		 *
		 * @see com.adobe.serialization.json.JSONTokenType
		 */
		public function set value(v:Object):void
		{
			_value=v;
		}
	}

}
